using System;
using System.Data;
using System.Data.SqlClient;
using System.Xml;

using Microsoft.VisualStudio.TestTools.UnitTesting;

using SharpCore.Utilities;

namespace SharpCore.Utilities.Testing
{
	/// <summary>
	/// Provides unit tests for the SharpCore.Utilities functionality.
	/// </summary>
	[TestClass]
	public class UnitTest
	{
		[TestMethod]
		public void EncryptionUnitTest()
		{
			string value = DateTime.Now.ToLongDateString();

			string encryptedValue = EncryptionUtility.Encrypt(value);
			Assert.AreNotEqual<string>(value, encryptedValue);
			Assert.AreNotSame(value, encryptedValue);

			string decryptedValue = EncryptionUtility.Decrypt(encryptedValue);
			Assert.AreEqual<string>(value, decryptedValue);
			Assert.AreNotSame(value, decryptedValue);
		}
	}
}
